// app.js
App({
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
  },
  globalData: {
    userInfo: null,
    xcxApi: "https://shequ.freecode.top/api/xcx/",
    h5Domain: "https://shequ.freecode.top/h5/",
    bomAry: [
      { 
        "id": "1", "title": "首页", 
        "icon0": "/imgs/index0.png", 
        "icon1": "/imgs/index1.png", 
        "link": "/pages/index/index" 
      },
      { 
        "id": "2", "title": "商业街", 
        "icon0": "/imgs/cart0.png", 
        "icon1": "/imgs/cart1.png", 
        "link": "/pages/mall/index" 
      },
      { 
        "id": "5", "title": "扫码", 
        "icon0": "/imgs/cart0.png", 
        "icon1": "/imgs/cart1.png", 
        "link": "/pages/mall/index" 
      },
      { 
        "id": "3", "title": "跑腿", 
        "icon0": "/imgs/fuwu0.png", 
        "icon1": "/imgs/fuwu1.png", 
        "link": "/pages/fuwu/index" 
      },
      { 
        "id": "4", "title": "我的", 
        "icon0": "/imgs/my0.png", 
        "icon1": "/imgs/my1.png", 
        "link": "/pages/my/index" 
      }
    ]
  }
})
